package utils

func UniqueSlice[T comparable](slice []T) []T {
	unique := make(map[T]bool)
	var result []T

	for _, value := range slice {
		if _, exists := unique[value]; !exists {
			unique[value] = true
			result = append(result, value)
		}
	}

	return result
}
